package com.itheima.factorybean;

import com.itheima.jdk.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author CC小天才
 * @website www.flyskill.cn
 * @date 2021/9/22 23:17
 **/

public class ProxyFactorBeanTest {

    public static void main(String[]args){
        String xmlPath="src/com/itheima/factorybean/applicationContext.xml";
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext(xmlPath);
        UserDao userDao=(UserDao)applicationContext.getBean("userDaoProxy");
        userDao.addUser();
        userDao.deleteUser();
    }
}
